package cn.itlaobing.service;

import cn.itlaobing.dao.ShoopingCarDao;
import cn.itlaobing.exception.MyException;
import cn.itlaobing.model.ShoopingCarModel;

import java.sql.SQLException;
import java.util.List;

/**
 * Created by Administrator on 2017-11-21.
 */
public class ShoopingCarService {
    private ShoopingCarDao shoopingCarDao=new ShoopingCarDao();
    public List<ShoopingCarModel> findAll() throws MyException {
        try {
            return shoopingCarDao.findAll();
        } catch (SQLException e) {
            e.printStackTrace();
            throw new MyException(e.getMessage());
        }
    }
}
